{% extends "base.html" %}
{% load i18n %}


{% block headtitle %}{% trans 'Password Reset' %}{% endblock %}


{% block breadcrumbs %}
<li><a href="/">{% trans 'Home' %}</a></li>
<li><a href="/account">{% trans 'Account' %}</a></li>
<li><a href="/account/passwordreset">{% trans 'Password Reset' %}</a></li>
{% endblock %}

{% block main_content %}

{% if validlink %}

<h1 class="pagetitle">{% trans 'Enter new password' %}</h1>

<p>{% trans "Please enter your new password twice so we can verify you typed it in correctly." %}</p>

<form class="loginform" action="" method="post">{% csrf_token %}
    
    {% if form.errors %}
    <p class="error">{{ form.non_field_errors }}</p>
    {% endif %} 
    
    <span class="label">{{ form.new_password1.label_tag }}{{ form.new_password1.errors }}</span>
    {{ form.new_password1 }}
    
    <span class="label">{{ form.new_password2.label_tag }}{{ form.new_password2.errors }}</span>
    {{ form.new_password2 }}
    
    <input type="submit" value="{% trans 'Change my password' %}" />
</form>

{% else %}

<h1 class="pagetitle">{% trans 'Password reset unsuccessful' %}</h1>

<p>{% trans "The password reset link was invalid, possibly because it has already been used. Please request a new password reset." %}</p>

{% endif %}

{% endblock %}
